<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>
    var a = 2

    function add(b, c) {
        return b + c
    }

    function addAll(b, c) {
        var d = 10
        result = add(b, c)
        return a + d + result
    }

    console.log(addAll(3, 6))  // 21


    function foo() {
        for (var i = 0; i < 5; i++) {

        }
        console.log(i) // 5
    }

    foo()
</script>
</body>
</html>